package com.hotline.monitor.schedule;

import com.hotline.monitor.service.agent.OnlineAgentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling
@Slf4j
public class HandshakeSchedule {
    @Autowired
    private OnlineAgentService onlineAgentService;

    @Scheduled(fixedRate = 30000)
    private void handshake() {
        onlineAgentService.agentevent();
    }
}
